# DAX API

The DAX API enables Cube to connect to [Microsoft Power BI][ref-powerbi].
It derives its name from [data analysis expressions][link-dax], a query language
for Power BI and SQL Server Analysis Services.

Unlike the [SQL API][ref-sql-api], it provides a native experience and superior
support for Power BI features.

<SuccessBox>

The DAX API is available in Cube Cloud on [Enterprise and above](https://cube.dev/pricing) product tiers.
It also requires the M [deployment tier](/product/deployment/cloud/pricing#deployment-tiers).

</SuccessBox>

<WarningBox>

The DAX API is currently in preview. Please [contact us](https://cube.dev/contact) to enable it for your account.

</WarningBox>

Read below about the DAX API [configuration](#configuration),
[authentication](#authentication), and [using it](#using-dax-api-with-power-bi) with Power BI.

See the [DAX API reference][ref-ref-dax-api] for the list of supported DAX functions.

<YouTubeVideo
  url="https://www.youtube.com/embed/vgrFPOMuJJs"
  aspectRatio={8/5}
/>

## Configuration

<WarningBox>

Please contact the customer success team in Cube Cloud so we can guide you
through the configuration.

</WarningBox>

To enable or disable the DAX API on a specific deployment, go to <Btn>Settings</Btn>
in the Cube Cloud sidebar, then <Btn>Configuration</Btn>, and then toggle the
<Btn>Enable DAX API</Btn> option.

### Date hierarchies

By default, the DAX API exposes all [time dimensions][ref-time-dimensions] as _date
hierarchies_ in [Power BI][ref-power-bi]. You can set the `CUBEJS_DAX_CREATE_DATE_HIERARCHIES`
environment variable to `false` to disable this behavior.

Note that each date hierarchy will include additional columns, suffixed by `_year`,
`_quarter`, `_month`, `_day`. If the data model has other members with names that follow
this pattern (e.g., a time dimension named `date` and another dimension named `date_year`
in the same cube or view), that would cause a conflict.

## Authentication

The DAX API supports [Kerberos][ref-kerberos] and [NTLM][ref-ntlm] authentication
methods.

While NTLM can be used for testing purposes, we strongly recommend configuring
Kerberos for production environments.

## Data modeling

<InfoBox>

The DAX API only exposes [views][ref-views], not cubes.

</InfoBox>


[ref-powerbi]: /product/configuration/visualization-tools/powerbi
[link-dax]: https://learn.microsoft.com/en-us/dax/
[ref-sql-api]: /product/apis-integrations/sql-api
[ref-ref-dax-api]: /product/apis-integrations/dax-api/reference
[ref-views]: /product/data-modeling/concepts#views
[ref-time-dimensions]: /product/data-modeling/concepts#time-dimensions
[ref-kerberos]: /product/auth/methods/kerberos
[ref-ntlm]: /product/auth/methods/ntlm
[ref-power-bi]: /product/configuration/visualization-tools/powerbi